<%@ include file="/common/taglibs.jsp" %>
<form:form commandName="userAccountDto" method="post" action="${actionUrl}" id="userForm">
<table class="detail">
<tr>
	<td colspan="2"><form:hidden path="id"/><form:errors path="id" cssClass="fieldError"/></td>
</tr>
<tr>
    <th><label for="firstName">* <spring:message code="register.user.firstName"/>:</label></th>
    <td>
        <form:input path="firstName" id="firstName"/>
        <form:errors path="firstName" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="lastName">* <spring:message code="register.user.lastName"/>:</label></th>
    <td>
        <form:input path="lastName" id="lastName"/>
        <form:errors path="lastName" cssClass="fieldError"/>
    </td>
</tr>

<tr>
    <th><label for="accountName">* <spring:message code="register.user.accountName"/>:</label></th>
    <td>
        <form:input path="accountName" id="accountName"/>
        <form:errors path="accountName" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="sex">* <spring:message code="register.user.sex"/>:</label></th>
    <td>
    	<form:select path="sex">
    		<form:option value="MALE"><spring:message code="register.user.sex.male"/></form:option>
    		<form:option value="FEMALE"><spring:message code="register.user.sex.female"/></form:option>
    	</form:select>
        <form:errors path="sex" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="birthday">* <spring:message code="register.user.birthday"/>:</label></th>
    <td>
    	<form:input path="birthday" id="birthday"/>
        <form:errors path="birthday" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="password">* <spring:message code="register.user.password"/>:</label></th>
    <td>
        <form:password path="password" id="password"/>
        <form:errors path="password" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="confirmedPassword">* <spring:message code="register.user.confirmedPassword"/>:</label></th>
    <td>
        <form:password path="confirmedPassword" id="confirmedPassword"/>
        <form:errors path="confirmedPassword" cssClass="fieldError"/>
    </td>
</tr>
<c:if test="${isMaintaining}">
<tr>
    <th><label for="newPassword"><spring:message code="register.user.newPassword"/>:</label></th>
    <td>
        <form:password path="newPassword" id="newPassword"/>
        <form:errors path="newPassword" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="confirmedNewPassword"><spring:message code="register.user.confirmedNewPassword"/>:</label></th>
    <td>
        <form:password path="confirmedNewPassword" id="confirmedNewPassword"/>
        <form:errors path="confirmedNewPassword" cssClass="fieldError"/>
    </td>
</tr>
</c:if>
<tr>
    <th><label for="zipCode">* <spring:message code="register.user.zipCode"/>:</label></th>
    <td>
        <form:input path="zipCode" id="zipCode"/>
        <form:errors path="zipCode" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="contactAddress">* <spring:message code="register.user.contactAddress"/>:</label></th>
    <td>
        <form:input path="contactAddress" id="contactAddress"/>
        <form:errors path="contactAddress" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="contactPhoneNumber"><spring:message code="register.user.contactPhoneNumber"/>:</label></th>
    <td>
        <form:input path="contactPhoneNumber" id="contactPhoneNumber"/>
        <form:errors path="contactPhoneNumber" cssClass="fieldError"/>
    </td>
</tr>
<tr>
    <th><label for="cellPhoneNumber">* <spring:message code="register.user.cellPhoneNumber"/>:</label></th>
    <td>
        <form:input path="cellPhoneNumber" id="cellPhoneNumber"/>
        <form:errors path="cellPhoneNumber" cssClass="fieldError"/>
    </td>
</tr>

<tr>
    <th><label for="emailAddress">* <spring:message code="register.user.emailAddress"/>:</label></th>
    <td>
        <form:input path="emailAddress" id="emailAddress"/>
        <form:errors path="emailAddress" cssClass="fieldError"/>
    </td>
</tr>

<tr>
    <td></td>
    <td>
        <input type="submit" class="aButton" name="save" value="<spring:message code="register.user.submit"/>"/>
      	<input type="reset" class="aButton" name="reset" value="<spring:message code="register.user.reset"/>"/>
    </td>
</tr>
</table>
</form:form>
<script>
	$(document).ready(function() {
		$("#birthday").datepicker({changeYear: true, yearRange : 'c-50:c+00'});
	});
</script>

